Skip to content

Fix issue #107: Skip acknowledgment prompt in non-interactive mode#121

Merged
rexlunae merged 1 commit intomainfrom
fix/onboard-non-interactive-prompt
Mar 20, 2026
Merged

Fix issue #107: Skip acknowledgment prompt in non-interactive mode#121
rexlunae merged 1 commit intomainfrom
fix/onboard-non-interactive-prompt

Conversation

@rexlunae
Copy link
Copy Markdown
Owner

@rexlunae rexlunae commented Mar 20, 2026

Fix issue #107: onboard --non-interactive still requires acknowledgment prompt

Problem

When running rustyclaw onboard --non-interactive, the command still prompts the user with "Do you acknowledge and wish to continue? [y/N]:" which defeats the purpose of the --non-interactive flag. Non-interactive mode should skip ALL prompts to enable automated setup workflows.

Solution

  • Added a non_interactive parameter to the run_onboard_wizard function
  • Modified the safety acknowledgment section to be conditionally displayed only when not in non-interactive mode
  • Updated all call sites in main.rs to pass the non_interactive flag from the command line arguments

Changes Made

  1. crates/rustyclaw-tui/src/onboard.rs:

    • Added non_interactive: bool parameter to run_onboard_wizard()
    • Wrapped the entire safety acknowledgment section (lines 41-83) in an if !non_interactive block
  2. crates/rustyclaw-cli/src/main.rs:

    • Updated run_onboard_wizard calls to pass the non_interactive flag:
      • Setup command with wizard flags: args.non_interactive
      • Onboard command: _args.non_interactive
      • Configure command: false (since configure doesn't have non-interactive option)

Testing

When rustyclaw onboard --non-interactive is run, the safety acknowledgment prompt will be skipped and the onboarding process will proceed directly to the agent naming step.

Compatibility

This change is backwards compatible - existing interactive usage remains unchanged, and only adds the ability to truly skip prompts when the --non-interactive flag is specified.

Fixes #107


Open with Devin

- Add non_interactive parameter to run_onboard_wizard function
- Skip safety acknowledgment prompt when --non-interactive flag is set
- Update all call sites to pass the non_interactive flag
- Fixes issue where 'rustyclaw onboard --non-interactive' still prompted for acknowledgment
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 3 additional findings in Devin Review.

Open in Devin Review

Comment on lines +42 to 85
if !non_interactive {
println!(
"{}",
t::warn("⚠ Important: Please read before continuing.")
);
println!();
println!(" {}", t::muted("Onboarding cancelled."));
println!(
" RustyClaw is an {}, meaning it can",
t::accent_bright("agentic coding tool")
);
println!(" read, write, and execute code on your machine on your");
println!(" behalf. Like any powerful tool, it should be used with");
println!(" care and awareness.");
println!();
println!(
" • {} and modify files in your project",
t::bold("It can create")
);
println!(" • {} commands in your terminal", t::bold("It can run"));
println!(
" • {} with external APIs using your credentials",
t::bold("It can interact")
);
println!();
println!(" Always review actions before approving them, especially");
println!(" in production environments. You are responsible for any");
println!(" changes made by the tool.");
println!();

let ack = prompt_line(
&mut reader,
&format!(
"{} ",
t::accent("Do you acknowledge and wish to continue? [y/N]:")
),
)?;
if !ack.trim().eq_ignore_ascii_case("y") {
println!();
println!(" {}", t::muted("Onboarding cancelled."));
println!();
return Ok(false);
}
println!();
return Ok(false);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 non_interactive flag only skips the safety acknowledgment but leaves all other interactive prompts active, causing the wizard to hang

The non_interactive parameter is only checked at crates/rustyclaw-tui/src/onboard.rs:42 to skip the safety acknowledgment prompt (step 0). However, the rest of the wizard (steps 0b through 8) still calls prompt_line, prompt_secret, and arrow_select without checking non_interactive, so the wizard immediately blocks waiting for stdin at the "Agent name" prompt (crates/rustyclaw-tui/src/onboard.rs:105). This is particularly problematic because the CLI flags document non_interactive as "Run wizard without prompts" (crates/rustyclaw-cli/src/main.rs:107-108) and "Run without prompts" (crates/rustyclaw-cli/src/main.rs:199-201), and for rustyclaw setup --non-interactive the flag's presence alone triggers the wizard path (crates/rustyclaw-cli/src/main.rs:598). Users in automated/CI environments will find the process hangs indefinitely.

Prompt for agents
The non_interactive flag in crates/rustyclaw-tui/src/onboard.rs needs to be threaded through the entire run_onboard_wizard function (not just the safety acknowledgment at line 42). When non_interactive is true, every interactive prompt should be skipped with sensible defaults:

1. Line 105: prompt_line for agent name - should use the current name or default "RustyClaw"
2. Lines 138-325: Secrets vault setup - should use auto-generated key file (no password), skip TOTP, skip SSH key
3. Lines 328-341: arrow_select for model provider - should use a default provider or the one already configured
4. Lines 350-449: Authentication prompts - should skip if credentials already exist, or fail gracefully
5. Lines 451-499: Base URL prompts - should use defaults
6. Lines 501-572: Model selection - should use default model
7. Lines 594-605: SOUL.md prompt - should use default
8. Line 623: setup_messaging - should skip
9. Line 627: setup_recommended_skills - should skip

Alternatively, consider early-returning with defaults when non_interactive is true, or passing the flag down to each helper function.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@rexlunae rexlunae merged commit 240025f into main Mar 20, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

onboard: --non-interactive still requires acknowledgment prompt

1 participant